<?php

/**
 * AbetAddDeleModif filter form base class.
 *
 * @package    sfproject
 * @subpackage filter
 * @author     Your name here
 */
abstract class BaseAbetAddDeleModifFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'secton_number'       => new sfWidgetFormPropelChoice(array('model' => 'AbetSectionCourse', 'add_empty' => true)),
      'course_Code'         => new sfWidgetFormPropelChoice(array('model' => 'AbetPlanStudy', 'add_empty' => true, 'key_method' => 'getCode')),
      'stutent_Code'        => new sfWidgetFormPropelChoice(array('model' => 'AbetStudent', 'add_empty' => true, 'key_method' => 'getCode')),
      'instructor_Code'     => new sfWidgetFormPropelChoice(array('model' => 'AbetInstructor', 'add_empty' => true, 'key_method' => 'getCode')),
      'student_Request_for' => new sfWidgetFormFilterInput(),
      'advisor_Answer'      => new sfWidgetFormFilterInput(),
      'advisor_Explination' => new sfWidgetFormFilterInput(),
      'created_at'          => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
      'updated_at'          => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
    ));

    $this->setValidators(array(
      'secton_number'       => new sfValidatorPropelChoice(array('required' => false, 'model' => 'AbetSectionCourse', 'column' => 'id')),
      'course_Code'         => new sfValidatorPropelChoice(array('required' => false, 'model' => 'AbetPlanStudy', 'column' => 'code')),
      'stutent_Code'        => new sfValidatorPropelChoice(array('required' => false, 'model' => 'AbetStudent', 'column' => 'code')),
      'instructor_Code'     => new sfValidatorPropelChoice(array('required' => false, 'model' => 'AbetInstructor', 'column' => 'code')),
      'student_Request_for' => new sfValidatorPass(array('required' => false)),
      'advisor_Answer'      => new sfValidatorPass(array('required' => false)),
      'advisor_Explination' => new sfValidatorPass(array('required' => false)),
      'created_at'          => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDate(array('required' => false)))),
      'updated_at'          => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDate(array('required' => false)))),
    ));

    $this->widgetSchema->setNameFormat('abet_add_dele_modif_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AbetAddDeleModif';
  }

  public function getFields()
  {
    return array(
      'id'                  => 'Number',
      'secton_number'       => 'ForeignKey',
      'course_Code'         => 'ForeignKey',
      'stutent_Code'        => 'ForeignKey',
      'instructor_Code'     => 'ForeignKey',
      'student_Request_for' => 'Text',
      'advisor_Answer'      => 'Text',
      'advisor_Explination' => 'Text',
      'created_at'          => 'Date',
      'updated_at'          => 'Date',
    );
  }
}
